import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
import dayjs from 'dayjs'
// 加载全局样式
import './styles/index.scss'

Vue.use(ElementUI, {
  size: 'small'
})

Vue.filter('formatDate', (value: any) => {
  return dayjs(value).format('YYYY-MM-DD HH:mm:ss')
})
Vue.filter('formatAvatar', (value: any) => {
  return value.portrait ? value.portrait : '//www.lgstatic.com/thumbnail_100x100/i/image2/M01/5E/65/CgotOVszSAOANi0LAAAse2IVWAE693.jpg'
})

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
